<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>图片上传 - Xui Demo</title>
	<!-- demo data -->
	<link rel="stylesheet" type="text/css" href="../demo.css">
	
	<!-- xui -->
	<link rel="stylesheet" type="text/css" href="../../xui.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../xui.js"></script>
	
	<!-- xupload -->
	<script type="text/javascript">
		$(function(){
			var xupload = $("#xupload").xupload({
				//url:"http://localhost:8080/xsoft/upload",	//服务器接口地址，默认为空选择文件后只显示预览，如果有值则上传到服务器后返显
				success:function(data){						//成功回调
					$.log(data);
				}
			});
		})
	</script>
</head>
<body>
	<h2>图片上传</h2>
	<form class="xform" enctype="multipart/form-data" method="post">
		<div class="xgroup">
			<label class="g1">封面图片</label>
			<div class="g2">
				<div class="xupload" id="xupload">
					<span class="xbtn">选择文件</span>
					<input class="xfile" type="file" name="img"/>
				</div>
			</div>
		</div>
	</form>
</body>
</html>